package com.ply.flashsalessystem.mapper;

import com.ply.flashsalessystem.entity.pojo.OrderTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import java.time.LocalTime;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author XiaoPan
 * @since 2022-04-07
 */
@Mapper
public interface OrderTimeMapper extends BaseMapper<OrderTime> {
    // 缓存配置
//    id = 1 查询 配置对象 查询 缓存
//    @Cacheable(value = "OrderTime", key = "#orderTimeId")
    OrderTime query(Integer orderTimeId);

//    @CachePut(value = "OrderTime", key = "#orderTimeId")
    int updateTime(LocalTime time, Integer orderTimeId);
}
